[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
DEC VAR
Function
Decrement the value of a variable specified by VAR.
Syntax
DEC var
var The variable with the value to decrement.
Remarks
Many programs require extensive addition and subtraction, and most
often, a value is increased or decreased by 1. This statement allows for
a shorter, more efficient method of decreasing (decrementing) a value
by 1 than subtracting 1 from a variable and assigning the result to the
same variable.
Examples
INTEGER i
PRINTLN "Countdown:"
LET i = 10
WHILE (i >= 0) DO
PRINTLN "T minus ",i
DEC i
ENDWHILE
See Also:
INC
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson